home *** CD-ROM | disk | FTP | other *** search
- **********************************************************************
- * program netspl.s residenter modul zur umlenkung *
- * pm 10/92 des gemdostraps 1. implementiert *
- * (pure-c) druck-dämon für *.pco-files. *
- **********************************************************************
-
- export oldgem
- export grpgem
- export tabstart
- export tabend
- export tab
- export grptrp
- export oldt5
- import show
- .text
-
- *-------------------------------*
- * residenter programmteil *
- *-------------------------------*
- dc.b "XBRANSPO"
-
- oldgem: dc.l 0
- oldt5: dc.l 0
- file: dc.w 0
-
- grptrp: tst.w flag
- bne dotrp
- move.l a1,-(a7)
- move.l tab,a1
-
- move.l $4ba,(a1)+
- move.w #5,(a1)+
- move.l 6(a7),(a1)+
- clr.l (a1)+
- clr.l (a1)+
- cmp.l #tabend,a1
- blo nixt
- move.l #tabstart,a1
- nixt:
- move.l a1,tab
- move.l (a7)+,a1
- dotrp:
- move.l oldt5,-(a7)
- rts
-
- grpgem:
- tst.w flag
- bne dogem
- move (a7),d0 * test user/super mode
- btst #13,d0
- bne.b sup
- move.l usp,a0
- bra.b tst
-
- sup: lea 6(a7),a0
- tst:
- cmp.w #$40,(a0) * is it Fwrite
- beq.b dowr
- cmp.w #632,(a0) * tcpread
- beq.b dord
- cmp.w #635,(a0) * tcpstat
- beq.b dord
- cmp.w #$42,(a0) * Fseek
- beq.b dord
- bra.b tryclose
-
- dowr:
- move.w 2(a0),file
- dord:
- move.l tab,a1
- move.l $4ba,(a1)+
- move.w 0(a0),(a1)+
- move.l 4(a0),(a1)+
- move.l 8(a0),(a1)+
- clr.l (a1)+
- move.l a1,tab
- move.l 2(a7),saveret
- move.l #myret,2(a7)
- move.l oldgem,-(a7)
- rts
-
- myret:
- move.l tab,a1
- move.l d0,-4(a1)
- cmp.l #tabend,a1
- bne nix
- move.l #tabstart,a1
- nix:
- move.l a1,tab
- move.l saveret,-(a7)
- rts
-
- dogem: move.l oldgem,-(a7)
- rts
- tryclose:
- tst.w flag
- bne dogem
- cmp.w #$3e,(a0)
- bne dogem
- move.w file,d0
- cmp 2(a0),d0
- bne dogem
- move.w #1,flag
- movem.l d2-a6,-(a7)
- jsr show
- movem.l (a7)+,d2-a6
- clr.w flag
- clr.w file
- bra dogem
-
- .data
-
- tab: dc.l tabstart
- flag: dc.w 0
- saveret: dc.l 0
-
- .bss
-
- tabstart:
- ds.w 4500
- tabend:
- ds.w 100
-
- end
-
-